package com.hchw.a01.state;

/**
 * @ClassName : PMState
 * @Description : 项目经理zhuangt
 * @Author : Felix Huang
 * @Date: 2021-08-15 19:10
 */
public class PMState implements LeaveRequestState {
    public void doWork(StateMachine ctx) {
        LeaveRequestModel lrm = (LeaveRequestModel)ctx.getBusinessVO();
        // 审核结果

        String result = "同意";
        if ("同意".equals(lrm.getResult())){
            if (lrm.getLeaveDays() > 3){
                ctx.setState(new DepMenageState());
            }else{
                ctx.setState(new AuditOverState());
            }
        }else {
            ctx.setState(new AuditOverState());
        }
    }
}
